package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhWithdrawMapper;
import com.ruoyi.xh.domain.XhWithdraw;
import com.ruoyi.xh.service.IXhWithdrawService;

/**
 * 财务管理Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhWithdrawServiceImpl extends ServiceImpl<XhWithdrawMapper,XhWithdraw> implements IXhWithdrawService {

    /**
     * 查询财务管理
     * 
     * @param id 财务管理主键
     * @return 财务管理
     */
    @Override
    public XhWithdraw selectXhWithdrawById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询财务管理列表
     * 
     * @param xhWithdraw 财务管理
     * @return 财务管理
     */
    @Override
    public Page<XhWithdraw> selectXhWithdrawList(XhWithdraw xhWithdraw)
    {
        return new Page<>();
    }

    /**
     * 新增财务管理
     * 
     * @param xhWithdraw 财务管理
     *
     */
    @Override
    public void insertXhWithdraw(XhWithdraw xhWithdraw)
    {
        this.save(xhWithdraw);
    }

    /**
     * 修改财务管理
     * 
     * @param xhWithdraw 财务管理
     *
     */
    @Override
    public void updateXhWithdraw(XhWithdraw xhWithdraw)
    {
        this.updateById(xhWithdraw);
    }

    /**
     * 批量删除财务管理
     * 
     * @param ids 需要删除的财务管理主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhWithdrawByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
